package com.jindy.module.oaLeaveApproval.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jindy.activiti.domain.ProcessEntity;
import com.jindy.common.annotation.Excel;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 请假审批对象 sy_oa_leave_approval
 * 
 * @author jindy
 * @date 2023-05-16
 */
@Data
public class SyOaLeaveApproval extends ProcessEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 流水单号 */
    @Excel(name = "流水单号")
    private String serialNum;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date leaveStartTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date leaveEndTime;

    /** 请假时长 */
    @Excel(name = "请假时长")
    private Long leaveDuration;

    /** 请假类型 */
    @Excel(name = "请假类型")
    private String leaveType;

    /** 请假原因 */
    @Excel(name = "请假原因")
    private String leaveReason;

    /** 业务状态 */
    @Excel(name = "业务状态")
    private String businessStatus;

    /** 申请人 */
    @Excel(name = "申请人")
    private String applyUserId;

    /** 申请人 */
    @Excel(name = "申请人")
    private String applyUserName;

    /** 申请时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date applyTime;

    /** 流程实例ID */
    @Excel(name = "流程实例ID")
    private String instanceId;

    /** 流程定义key */
    @Excel(name = "流程定义key")
    private String processKey;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("id", id)
                .append("serialNum", serialNum)
                .append("leaveStartTime", leaveStartTime)
                .append("leaveEndTime", leaveEndTime)
                .append("leaveDuration", leaveDuration)
                .append("leaveType", leaveType)
                .append("leaveReason", leaveReason)
                .append("businessStatus", businessStatus)
                .append("applyUserId", applyUserId)
                .append("applyUserName", applyUserName)
                .append("applyTime", applyTime)
                .append("instanceId", instanceId)
                .append("processKey", processKey)
                .append("delFlag", delFlag)
                .toString();
    }
}
